package org.asiainfo.gateway.config.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;

/**
 * 验证码配置
 *
 * @author dotor-ww
 */
@Configuration
@RefreshScope
@Data
@ConfigurationProperties(prefix = "security.captcha")
public class CaptchaProperties {

    /**
     * 验证码开关
     */
    private Boolean enabled;

    /**
     * 验证码类型
     */
    private String type;

    /**
     * 验证码存活时长(秒)
     */
    private Long captchaLiveTime;

    /**
     * 验证码请求次数
     */
    private Integer challengeAttempts;

    /**
     * 验证错误次数
     */
    private Integer verificationErrorCount;

    /**
     * 错误次数超出限制后锁定的时间(秒)
     */
    private Long lockTime;
}
